package com.car.main;

import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

import com.kb.crawl.KBCrawlOfBitAuto;
import com.kb.dao.KBDaoOfBitAuto;

public class KBMainOfBitAuto {

	public static void main(String[] args) {
		KBDaoOfBitAuto kbdao = new KBDaoOfBitAuto();
		List<String> urlSpell = kbdao.getUrlSpell();
		System.out.println(urlSpell.size());
		ExecutorService fixedThreadPool = Executors.newFixedThreadPool(35);
		for (String url : urlSpell) {
			fixedThreadPool.execute(new KBCrawlOfBitAuto(kbdao, url));
		}
		fixedThreadPool.shutdown();
	}

}
